package VO;

import java.io.Serializable;

import PO.*;

public class FrameVO implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String name;
	private frame f1,f2;
	private int Year;
	private int Graduate;
	boolean apply;

	public FrameVO (FramePO po)
	{
		
		this.id = po.getID();
		this.apply = po.getApply();
		this.Graduate = po.getGraduate();
		f1=po.getFrame1();
		f2=po.getFrame2();
		this.name = po.getName();
		this.Year = po.getYear();
	}
	public FramePO getPO()
	{
		
		int id = getID();
		boolean apply = getApply();
		int Graduate = getGraduate();
		String name = getName();
		int Year = getYear();
		return new FramePO(id, name,f1,f2, Year, Graduate, apply);
	}
	public FrameVO(int i, String n, frame F1,frame F2 , int Y, int G )
	{
		this (i,n,F1,F2,Y,G,false);
	}

	public FrameVO(int i, String n, frame F1,frame F2 , int Y, int G,
			 boolean a) {
		id = i;
		name = n;
		f1= F1;
		f2 = F2;
		Year = Y;
		Graduate = G;
		apply = a;

	}

	public int getID() {

		return id;
	}

	public String getName() {

		return (name);
	}



	public void apply() {
		apply = true;

	}

	public void cancelapply() {

		apply = false;
	}

	public boolean getApply() {

		return (apply);
	}


	public frame getFrame1()
	{
		
		return f1;
	}

	public frame getFrame2()
	{
		
		return f2;
	}

	public int getYear() {
		return (Year);

	}

	public int getGraduate() {
		return (Graduate);
	}


	public void update(int i, String n, frame F1,frame F2 , int Y, int G,
			 boolean a) {
		id = i;
		name = n;
		f1= F1;
		f2 = F2;
		Year = Y;
		Graduate = G;
		apply = a;

	}
}
